home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 August: Tool Chest / Dev.CD Aug 00 TC Disk 2.toast / pc / sample code / human interface toolbox / progressbars / prototypes.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-06-23  |  2.8 KB  |  110 lines

  1. /*
  2.     File:        Prototypes.h
  3.  
  4.     Contains:    Prototypes
  5.  
  6.     Written by: Chris White    
  7.  
  8.     Copyright:    Copyright © 1996-1999 by Apple Computer, Inc., All Rights Reserved.
  9.  
  10.                 You may incorporate this Apple sample source code into your program(s) without
  11.                 restriction. This Apple sample source code has been provided "AS IS" and the
  12.                 responsibility for its operation is yours. You are not permitted to redistribute
  13.                 this Apple sample source code as "Apple sample source code" after having made
  14.                 changes. If you're going to re-distribute the source, we require that you make
  15.                 it clear in the source that the code was descended from Apple sample source
  16.                 code, but that you've made changes.
  17.  
  18.     Change History (most recent first):
  19.                 8/10/1999    Karl Groethe    Updated for Metrowerks Codewarror Pro 2.1
  20.                 
  21.  
  22. */
  23.  
  24. #ifndef __PROTOTYPES__
  25. #define __PROTOTYPES__
  26.  
  27.  
  28.  
  29. // System Includes
  30.  
  31. #ifndef __WINDOWS__
  32.     #include <Windows.h>
  33. #endif
  34.  
  35.  
  36.  
  37.  
  38.  
  39. // Application Includes
  40.  
  41. #ifndef __BAREBONES__
  42.     #include "BareBones.h"
  43. #endif
  44.  
  45.  
  46.  
  47.  
  48.  
  49. // BareBones.c
  50. void            main ( void );
  51.  
  52.  
  53. // Initialize.c
  54. void            InitToolbox ( void );
  55. void            InitApplication ( void );
  56.  
  57.  
  58. // AppleEventStuff.c
  59. OSErr            InstallAppleEventHandlers ( void );
  60.  
  61.  
  62. // Events.c
  63. void            EventLoop ( void );
  64.  
  65.  
  66. // Windows.c
  67. void            DoActivate ( EventRecord* theEvent );
  68. void            DoUpdate ( EventRecord* theEvent );
  69. void            DoContentClick ( WindowRef theWindow, EventRecord* theEvent );
  70. void            DoDragWindow ( WindowRef theWindow, EventRecord* theEvent );
  71.  
  72.  
  73. // Menus.c
  74. void            MenuDispatch ( SInt32 menuResult );
  75. void            AdjustMenus ( void );
  76.  
  77.  
  78. // Utilities.c
  79. StringPtr        CopyPStr ( Str255    inSourceStr, StringPtr outDestStr, SInt16 inDestSize );
  80. StringPtr        ConcatPStr ( Str255 ioFirstStr, Str255 inSecondStr, SInt16 inDestSize );
  81. void            OSTypeToPStr ( OSType inOSType, StringPtr outString );
  82. void            PStrToOSType ( StringPtr inString, OSType* outOSType );
  83. void            AlertUser ( short messageCode, short errorNum, StringPtr theString );
  84. void            LocalToGlobalRect ( Rect* theRect );
  85. Boolean            IsMovableModal ( WindowRef theWindow );
  86. pascal void        OutlineUserItem ( DialogRef theDialog, SInt16 theItem );
  87.  
  88. #if DEBUGGING
  89. void            DebugStrNum ( Str255 str, int num );
  90. #endif
  91.  
  92.  
  93. // NonThreadedProgress.c
  94. OSErr            ProgressOperation ( tOperation theOperation, void* refCon, StringPtr theText );
  95. Boolean            UpdateProgressBar ( DialogRef theDialog, int doneAmount, int maxAmount );
  96. Boolean            StandardDemoOperation ( void* refCon, DialogRef theDialog );
  97. Boolean            BarberPoleDemoOperation ( void* refCon, DialogRef theDialog );
  98.  
  99.  
  100.  
  101. // ThreadedProgress.c
  102. OSErr            ThreadedProgressOperation ( tThreadedOperation theOperation, void* refCon,
  103.                                 StringPtr theText, SInt32* operationErr, Boolean bBarberPole );
  104. pascal SInt32    ThreadedBarberPoleDemoOperation ( tThreadedOperationPtr theInfo );
  105. pascal SInt32    ThreadedStandardDemoOperation ( tThreadedOperationPtr theInfo );
  106.  
  107.  
  108.  
  109. #endif
  110.